﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleService.Model
{
    public class UserTokenModel
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string Account { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 身份权限
        /// </summary>
        public string Sub { get; set; }

        /// <summary>
        /// 用户身份信息
        /// </summary>
        public string Token { get; set; }
    }

    public class Login
    {
        public string state { get; set; }
        public string message { get; set; }
        public UserTokenModel data { get; set; }
    }

    public class CompanyResult
    {
        public string state { get; set; }
        public string message { get; set; }
        public Datas data { get; set; }
    }

    public class Datas
    {
        /// <summary>
        /// 
        /// </summary>
        public List<Company> rows { get; set; }


        public int pagesize { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int page { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int records { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int total
        {
            get
            {
                if (records > 0)
                {
                    return records % this.pagesize == 0 ? records / this.pagesize : records / this.pagesize + 1;
                }
                else
                {
                    return 0;
                }
            }
        }
    }
}
